import request from "@/plugins/request";

var pre = "/inteCater/foodBeverages/strangeEat";

if (process.env.NODE_ENV !== "development") {
    pre = "/api/sa/smar-catering" + pre;
}

// 分页查询异地就餐申请信息
export function getPage(data) {
    return request({
        url: `${pre}/getPage`,
        method: "post",
        data,
    });
}


// 新增异地就餐申请
export function add(data) {
    return request({
        url: `${pre}/add`,
        method: "post",
        data,
    });
}


// 修改异地就餐申请
export function upd(data) {
    return request({
        url: `${pre}/upd`,
        method: "post",
        data,
    });
}


// 修改异地就餐申请
export function delByStrangeId(data) {
    return request({
        url: `${pre}/delByStrangeId?strangeEatId=${data}`,
        method: "get"
    });
}


// 获取当前用户申请食堂列表
export function getCanteenList() {
    return request({
        url: `${pre}/getCanteenList`,
        method: "get"
    });
}


// 根据id获取详细信息
export function getInfoById(data) {
    return request({
        url: `${pre}/getInfoById?strangeEatId=${data}`,
        method: "get"
    });
}

// 根据申请标识取消
export function updCancel(data) {
    return request({
        url: `${pre}/updCancel?strangeEatId=${data}`,
        method: "get"
    });
}